<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8">
        <title>微信公众平台营销管理系统</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

    <include file='Public:header' />

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="__ROOT__/public/js/html5shiv.js"></script>
    <![endif]-->
</head>

<body>
    <!--nav-->
<include file='Public:nav' />

<div class="container">
    <div class="page-header"><h4>[{$choujiang_name}]奖品管理</h4></div>
    <div class="row">
        <div class="span12">
            <div class="pull-left">
                <a class="btn btn-primary" href="{:U('/choujiang')}">活动列表</a>&nbsp;&nbsp;
                <php>if(check_auth('Activities/Choujiang/award/add')) echo '<a href="'.U($module_name.'/add?choujiang_id='.$choujiang_id).'" class="btn btn-primary">新增奖品</a>';</php>
            </div>
        </div>

        <div class="span12" style="margin-top:10px;">
            <div id='pop'></div>
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>奖品名称</th>
                        <th>奖品说明</th>
                        <th>奖项排序</th>
                        <th>奖品数量</th>
                        <th>中出数量</th>
                        <th>兑换数量</th>
                        <th>中奖系数</th>
                        <th>是否生成兑换码</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <td colspan="10"><div class="row pagination page"><div class="span12">{$page}</div></div></td>
                    </tr>
                </tfoot>
                <tbody>
                <foreach name='list' item='vo'>
                    <tr id='tr_{$vo.id}'>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.explain}</td>
                        <td>{$vo.sort}</td>
                        <td>{$vo.num}</td>
                        <td>{:get_award_shengyu($vo['id'])}</td>
                        <td>{:get_award_duihuan($vo['id'])}</td>
                        <td>{$vo.chance}</td>
                        <td>{:get_status_img($vo['make_key'])}</td>
                        <td>
                    <php>
                        if(check_auth('Activities/Choujiang/award/edit')) echo '<a href="'.U($module_name.'/edit?id='.$vo['id']).'">编辑</a>&nbsp;&nbsp;';
                        if(check_auth('Activities/Choujiang/award/delete')) echo '<a href="###" onclick="delete_tr('.$vo['id'].');">删除</a></td>';
                    </php>
                    </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
        </div>
    </div>
</div>
<include file='Public:footer' />

<script type="text/javascript" src="__PUBLIC__/js/list.js"></script>


</body>
</html>
